import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '@/components/Home'
import car from '@/components/shop/car'
import newslist from '@/components/news/newslist'
import newsinfo from '@/components/news/newsinfo'
import photolist from '@/components/photo/photolist'
import photoinfo from '@/components/photo/photoinfo'
import goodslist from '@/components/goods/goodslist'
import goodsinfo from '@/components/goods/goodsinfo'
import goodsdesc from '@/components/goods/goodsdesc'
import goodscontent from '@/components/goods/goodscontent'

Vue.use(VueRouter)
export default new VueRouter({
  linkActiveClass:'mui-active',
  routes: [
    {
      path:'/',
      redirect:'/home'
    },
    {
      path:'/home',
      name:'home',
      component:home
    },
    {
      path:'/shopcar',
      name:'car',
      component:car
    },
    {
      path:'/newslist',
      name:'newslist',
      component:newslist
    },
    {
      path:'/newsinfo/:id',
      name:'newsinfo',
      component:newsinfo
    },
    {
      path:'/photo/list',
      name:'photolist',
      component:photolist
    },
    {
      path:'/photo/info/:id',
      name:'photoinfo',
      component:photoinfo
    },
    {
      path:'/goods/list',
      name:'goodslist',
      component:goodslist
    },
    {
      path:'/goods/getinfo/:id',
      name:'goodsinfo',
      component:goodsinfo
    },
    {
      path:'/goods/desc/:id',
      name:goodsdesc,
      component:goodsdesc

    },
    {
      path:'/goods/content/:id',
      name:goodscontent,
      component:goodscontent
    }
  ]
})
